<template>
  <div class="operand-editor">
    <q-radio v-model="model.type" val="variable" label="变量" />
    <q-radio v-model="model.type" val="string" label="常量" />
    <yzOperand
      v-model="model"
      :op="op"
      :labelOptions="labelOptions"
    ></yzOperand>
  </div>
</template>
<script>
import YzOperand from 'src/boot/common/yzOperand'
import yzOperand from './yz-operand.vue'
export default {
  name: 'yz-operand-editor',
  props: {
    model: {
      type: YzOperand,
      require: true
    },
    op: {
      type: String
    },
    labelOptions: {
      type: Array,
      require: true
    }
  },
  model: {
    prop: 'model',
    event: 'submit'
  },
  data () {
    return {
      selectorOptions: [
        { label: '变量', value: 'variable' },
        { label: '数值', value: 'real' },
        { label: '字符串', value: 'string' }
      ]
    }
  },
  components: {
    yzOperand
  }
}</script>
<style lang="scss">
.operand-editor {
  display: flex;
}
</style>
